import {Injectable} from "@angular/core";
import {HttpClient} from "../../../../providers/httpClient";


@Injectable()
export class IrpQjtHomeService {
  constructor(private httpClient: HttpClient) {
  }
  getIRMResearchReport(orgid,startdate,enddate) {
    let postBody: any = {
      module: "KSB",
      method: "IRM_A02_0050",
      params: {
        orgid: orgid,
        startdate:startdate,
        enddate:enddate
      }
    };
    return this.httpClient.post(postBody, {
      isShowLoading: false
    });
  }

  getIRMResearchReportRank(orgid,startdate,enddate) {
    let postBody: any = {
      module: "KSB",
      method: "IRM_A02_0060",
      params: {
        orgid: orgid,
        startdate:startdate,
        enddate:enddate
      }
    };
    return this.httpClient.post(postBody, {
      isShowLoading: false
    });
  }

  getIRMOnBusiness(orgid,startdate) {
    let postBody: any = {
      module: "OAServer",
      method: "getIRMOnBusiness",
      params: {
        orgid: orgid,
        startdate:startdate
      }
    };
    return this.httpClient.post(postBody, {
      isShowLoading: false
    });
  }

  getIRMPolicyRecommend(orgid,startdate,enddate) {
    let postBody: any = {
      module: "KSB",
      method: "IRM_A02_0080",
      params: {
        orgid: orgid,
        startdate:startdate,
        enddate:enddate
      }
    };
    return this.httpClient.post(postBody, {
      isShowLoading: false
    });
  }

  getIRMGoldStockRecommend(orgid,startdate,enddate) {
    let postBody: any = {
      module: "KSB",
      method: "IRM_A02_0090",
      params: {
        orgid: orgid,
        startdate:startdate,
        enddate:enddate
      }
    };
    return this.httpClient.post(postBody, {
      isShowLoading: false
    });
  }

  getIRMMorningStorck(orgid,startdate,enddate) {
    let postBody: any = {
      module: "KSB",
      method: "IRM_A02_0100",
      params: {
        orgid: orgid,
        startdate:startdate,
        enddate:enddate
      }
    };
    return this.httpClient.post(postBody, {
      isShowLoading: false
    });
  }

  getIRMStockPoolAdjustment(orgid,startdate,enddate) {
    let postBody: any = {
      module: "KSB",
      method: "IRM_A02_0110",
      params: {
        orgid: orgid,
        startdate:startdate,
        enddate:enddate
      }
    };
    return this.httpClient.post(postBody, {
      isShowLoading: false
    });
  }
  getIRMSIRMOrgid(logonname){
    let postBody: any = {
      module: "KSB",
      method: "IRM_A02_0010",
      params: {
        logonname:logonname
      }
    };
    return this.httpClient.post(postBody, {
      isShowLoading: false
    });
  }
}
